package com.zsrt.java.day20170103.wrl.t07.inter;

import org.junit.Test;

public class Computer {
	public static void plugin(USB usb){
		usb.start();
		usb.work();
		usb.stop();
	}
	
	@Test
	public void usbTest(){
		//插入U盘
		USB flash = new Flash00();
		Computer.plugin(flash);
		System.out.println("***************************");
		
		//插入打印机
		USB printer = new Printer();
		Computer.plugin(printer);
	}
}
